package com.yh.workbill.db;

import androidx.annotation.ColorInt;
import androidx.room.ColumnInfo;
import androidx.room.Entity;
import androidx.room.PrimaryKey;

//这里添加数据只要是使用起来jetpack  主要保存token和账号
@Entity(tableName = "t_userinfo")
public class UserInfo {

    @PrimaryKey(autoGenerate = true)
    private int id;
    @ColumnInfo(name = "uuid")
    private String uuid;
    @ColumnInfo(name = "phone")
    private String phone;

    //一开始忘记加了，数据库版本从1，升级到2
    @ColumnInfo(name = "token")
    private String token;

    public UserInfo(String uuid, String phone, String token) {
        this.uuid = uuid;
        this.phone = phone;
        this.token = token;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getUuid() {
        return uuid;
    }

    public void setUuid(String uuid) {
        this.uuid = uuid;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    @Override
    public String toString() {
        return "UserInfo{" +
                "id=" + id +
                ", uuid='" + uuid + '\'' +
                ", phone='" + phone + '\'' +
                ", token='" + token + '\'' +
                '}';
    }
}
